//package com.xin.springboot.controller;
//
//import org.springframework.stereotype.Controller;
//import org.springframework.util.StringUtils;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//
//import java.util.Map;
//
//
//@Controller
//public class LoginController {
////  处理POST请求 等于@RequestMapping(value = "/user/login" method = "RequestMethod.POST")
//
//    @PostMapping(value = "/login")
//    public String login(@RequestParam("username")  String username, @RequestParam("password") String password,
//                        Map<String,Object> map){
//        if (!StringUtils.isEmpty(username) && "123456".equals(password)){
//            //登录成功
//            return "dashboard";
//        }else {
//            //登录失败
//            map.put("message","用户名或密码错误");
//            return "index";
//        }
//
//    }
//}
